<?php

namespace Home\Model;
use Think\Model\RelationModel;

class CarModel extends RelationModel {

    protected $tableName = 'car';
    protected $pk = 'Id';
    protected $_link = array(
        'User'=>array(
            'mapping_type'      =>  self::BELONGS_TO,
            'class_name'        =>  'User',
            'mapping_name'      =>  'user',
            'foreign_key'       =>  'uid',
            )
        );
}